<template>
  <div class="h_title">
    <div >
      <img src="../assets/img/tb.png" alt="" />
      <span>电商后台管理系统</span>
    </div>
    <div class="div2">
      <!-- autoplay="autoplay" -->
      <audio src="../assets/bgm.mp3"   controls="controls" preload="auto"></audio>
      <i class="el-icon-switch-button" @click="logout"></i>
    </div>
  </div>
</template>

<script>
export default {
  name: "homeHeader",
  methods: {
      logout() {
        sessionStorage.clear();
        this.$router.replace({ name: "login" });
      },
  },
};
</script>

<style lang="less" scoped>
.h_title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 0;
  div {
    display: flex;
    align-items: center;
    img {
      width: 55px;
      height: 55px;
      border-radius: 50%;
      margin-right: 10px;
    }
    span {
      font-size: 20px;
    }
  }
  .div2{
    audio {
      margin-right: 15px;
    }
  }
  .el-icon-switch-button {
    font-size: 21px;
  }
  .el-icon-switch-button:hover {
    font-size: 28px;
    cursor: pointer;
  }
}
</style>